﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SolutionBLL;
using SolutionModel;

public partial class admin_system_SortTable : System.Web.UI.Page
{

    T_MenuBLL bll=new T_MenuBLL();


    protected void Page_Load(object sender, EventArgs e)
    {
        String act = Request.QueryString["act"];
        if (act=="sort")
        {
            int cid =0;
            int targetid = 0;
            
            try
            {
               cid = Convert.ToInt32(String.IsNullOrEmpty(Request["cid"]) ? "0" : Request["cid"]);
               targetid = Convert.ToInt32(String.IsNullOrEmpty(Request["targetid"]) ? "0" : Request["targetid"]);
            }
            catch (Exception emsg)
            {
                Response.Write("cid 或者targetid 参数有误，如果无法解决请联系技术人员！ 错误信息：" + emsg.Message);
                Response.End();
            }
            if (cid!=0)
            {
                //bll.SortMenu(cid, targetid);
            }
            Response.End();
            
        }

        int pid = 0;
        try
        {
            pid = Convert.ToInt32(String.IsNullOrEmpty(Request.QueryString["pid"]) ? "-1" : Request.QueryString["pid"]);
        }
        catch (Exception emsg)
        {
            Response.Write("pid参数有误，如果无法解决请联系技术人员！ 错误信息：" + emsg.Message);
            Response.End();
        }
        this.rpTreeList.DataSource= bll.GetTreeByPid(pid);
        this.rpTreeList.DataBind();


    }
}